﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AppData
{

    [System.Serializable]
    public partial class Tex //: ISerialize
    {
        public byte[] tex;
        //public int texWidth;
        //public int texHeight;

        public bool isNull => tex == null || tex.Length <= 0;
        public Tex()
        {

        }
        public Tex(byte[] tex)
        {
            this.tex = tex;
        }
        //public Tex(byte[] tex, int texWidth, int texHeight)
        //{
        //    this.tex = tex;
        //    this.texWidth = texWidth;
        //    this.texHeight = texHeight;
        //}

        public static bool IsNull(Tex tex)
        {
            return tex == null || tex.tex == null || tex.tex.Length <= 0;
        }

        public override string ToString()
        {
            return $"[length:{this.tex?.Length}]";
        }

    }

}
